/*
 * SwissReProxy.java
 * 
 * Created on Oct 23, 2007, 12:25:59 PM
 * 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package tools;

import java.io.IOException;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.ProxySelector;
import java.net.SocketAddress;
import java.net.URI;
import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author alhshk
 */
public class CorporateProxySelector extends ProxySelector {
    static final List<Proxy> proxyList = new ArrayList<Proxy>();
    
    static {
        proxyList.add( new Proxy(Proxy.Type.HTTP, new InetSocketAddress( "gate", 8080 ) ) );
    }
    
    @Override
    public List<Proxy> select( final URI uri ) {
        return proxyList;
    }

    @Override
    public void connectFailed(URI uri, SocketAddress sa, IOException ioe) {
        //do nothing
    }

}
